package com.central.common.model

import com.fasterxml.jackson.annotation.JsonFormat
import org.springframework.format.annotation.DateTimeFormat
import java.io.Serializable


/**
 * 二级评论
 */
data class CommentSecondVo(

    /**
     * id
     */
    var id: Long? = null,

    /**
     * 评论内容
     */
    var content: String? = "",

    /**
     * 评论人id
     */
    var userId: Long? = null,

    /**
     * 评论人昵称
     */
    var userName: String? = "",

    /**
     * 评论人头像
     */
    var userAvatar: String? = "",

    /**
     * 是否是自己评论的
     */
    var myComment: Boolean? = false,

    /**
     * 点赞数
     */
    var likeNum: Long? = 0L,

    /**
     * 回复人id
     */
    var replyUserId: Long? = null,

    /**
     * 回复人昵称
     */
    var replyUserName: String? = "",

    /**
     * 回复人头像
     */
    var replyAvatar: String? = "",

    /**
     * 回复时间
     */
    var replyTime: String? = null
): Serializable

/**
 * 顶级评论
 */
data class TopCommentVo(

    /**
     * id
     */
    var id: Long? = null,

    /**
     * 评论内容
     */
    var content: String? = "",

    /**
     * 评论人id
     */
    var userId: Long? = null,

    /**
     * 评论人昵称
     */
    var userName: String? = "",

    /**
     * 评论人头像
     */
    var userAvatar: String? = "",

    /**
     * 是否是自己评论的
     */
    var myComment: Boolean? = false,

    /**
     * 点赞数
     */
    var likeNum: Long? = 0L,

    /**
     * 回复时间
     */
    var replyTime: String? = null
): Serializable


/**
 * 统一评论返回实体
 */
data class CommentVo(

    /**
     * 顶级评论
     */
    var topCommentVo: TopCommentVo? = null,

    /**
     * 二级评论
     */
    var CommentReply: List<CommentSecondVo>? = null
): Serializable


data class CommentRpcDto(

    /**
     * 评论内容
     */
    var content: String? = "",

    /**
     * 上级id
     */
    var pid: Long? = 0L,

    /**
     * 顶级id
     */
    var topId: Long? = 0L,

    /**
     * 关联的id
     */
    var relevanceId: Long? = null,

    /**
     * 评论类型
     */
    var type: Int? = null,

    /**
     * 创建人
     */
    var createBy: Long? = null,
) : Serializable


